package cn.edu.nit.sys.entity;

import cn.edu.nit.sys.enums.FlowEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @Author 罗文斌
 * @Date 2023/3/20
 * @Version 1.0.0
 */
@Data
@TableName("sys_approve")
public class Approve {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    private String flowId;
    @TableField(exist = false)
    private String nodeCode;
    private FlowEnum node;
    private String auditorId;
    private String auditor;
    private String result;
    private String opinion;
    private String createTime;

    public String getNodeCode() {
        return FlowEnum.getCode(this.node);
    }
}
